<!DOCTYPE html>
<html>
<head>
    <title>订单评价</title>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="author" content="">
    <meta name="description" content="至上会计移动端CRM管理系统">
    <link rel="stylesheet" href="../lib/weui.min.css">
    <link rel="stylesheet" href="../css/jquery-weui.css">
    <link rel="stylesheet" href="css/mywe.css">
    <link rel="stylesheet" href="css/shop.css">
</head>
<body ontouchstart>
    <header class='demos-header'>
        <div class="demos-left" onclick="history.go(-1)"><i class="iconfont">&#xe65a;</i></div>
        <h3 class="demos-title">评价订单</h3>
        <div class="demos-right">发布</div>
    </header>
    <main class="order-eva">
        <div class="weui-cells">
            <div class="weui-cell" id="shopeva">
                <div class="weui-cell__hd">服务评分</div>
                <div class="weui-cell__bd">
                    <p class="text-center">
                        <i class="iconfont">&#xe655;</i>
                        <i class="iconfont">&#xe655;</i>
                        <i class="iconfont">&#xe655;</i>
                        <i class="iconfont">&#xe655;</i>
                        <i class="iconfont">&#xe655;</i>
                    </p>
                </div>
                <div class="weui-cell__ft"></div>
            </div>
            <div class="weui-cell" id="staffeva">
                <div class="weui-cell__hd">对服务者</div>
                <div class="weui-cell__bd">
                    <p class="text-center">
                        <i class="iconfont">&#xe655;</i>
                        <i class="iconfont">&#xe655;</i>
                        <i class="iconfont">&#xe655;</i>
                        <i class="iconfont">&#xe655;</i>
                        <i class="iconfont">&#xe655;</i>
                    </p>
                </div>
                <div class="weui-cell__ft"></div>
            </div>
        </div>
        <div class="weui-cells weui-cells_form">
            <div class="weui-cell">
                <div class="weui-cell__bd">
                    <textarea class="weui-textarea" placeholder="我们的服务满足您的期待吗？说说你的感受，分享给想要买的人们吧" rows="5"
                              maxlength="300"></textarea>
                </div>
            </div>
        </div>
    </main>
    <footer class="weui-flex">
        <a href="/staffhome" class="weui-flex__item">
            <i class="iconfont">&#xe614;</i>
            <p>首页</p>
        </a>
        <a href="/workbench/contact" class="weui-flex__item">
            <i class="iconfont">&#xe809;</i>
            <p>通讯录</p>
        </a>
        <a href="/dailylook" class="weui-flex__item">
            <i class="iconfont">&#xe670;</i>
            <p>发现</p>
        </a>
        <a href="/custom" class="weui-flex__item active">
            <i class="iconfont">&#xe603;</i>
            <p>我的</p>
        </a>
    </footer>
    <script src="../lib/jquery-2.1.4.js"></script>
    <script src="../lib/fastclick.js"></script>
    <script src="../js/jquery-weui.min.js"></script>
    <script>
        var j;
        var k;
        $("#shopeva i.iconfont").click(function () {
            j = $(this).index();
            $(this).parent().find("i.iconfont").html("&#xe655;").removeClass("color-red");
            $(this).parent().find("i.iconfont").each(function (i) {
                if(i<=j){
                    $(this).html("&#xe678;").addClass("color-red");
                }
            });
            $(this).parents(".weui-cell").find(".weui-cell__ft").text(mytext(j));
        });
        $("#staffeva i.iconfont").click(function () {
            k = $(this).index();
            $(this).parent().find("i.iconfont").html("&#xe655;").removeClass("color-red");
            $(this).parent().find("i.iconfont").each(function (i) {
                if(i<=k){
                    $(this).html("&#xe678;").addClass("color-red");
                }
            });
            $(this).parents(".weui-cell").find(".weui-cell__ft").text(mytext(k));
        });
        function mytext(n) {
            var mytext="";
            if (n==0){
                mytext="非常差";
            }else if(n==1){
                mytext="差评";
            }else if(n==2){
                mytext="一般"
            }else if(n==3){
                mytext="满意"
            }else if(n==4){
                mytext="非常满意"
            }
            return mytext;
        }
        $(".demos-right").click(function () {
            if (j==null){
                $.alert("请对服务进行评价");
                return;
            }
            if (k==null){
                $.alert("请对服务者进行评价");
                return;
            }

        });
    </script>
</body>
</html>